import Vue from 'vue'
import VueRouter from 'vue-router'
import Homepage from '../views/home_page/shouye.vue'
import Chatpage from '../views/message_page/message.vue'
import Shequpage from '../views/shequ_page/shequ.vue'
import Myminepage from '../views/mcusercenter_page/mcusercenter.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home',
  },
  {
    // 登录
    path: '/login',
    name: 'login',
    // children: [
    //   {
    //     path: 'loginaccount',
    //     component:() => import('../views/login_page/login_account.vue')
    //   },
    //   {
    //     path: 'loginvart',
    //     component: () => import('../views/login_page/login_verti.vue')
    //   }
    // ],
    component: () => import('../views/login_page/login.vue')
  },

  {
    // 注册
    path: '/register',
    name: 'register',
    component: () => import('../views/login_page/register.vue')
  },
 
  {
    //首页
    path: '/home',
    name: 'home',
    component:Homepage
  },
  {
    //消息
    path: '/message',
    name: 'message',
    component:Chatpage
  },
  {
    //社区
    path: '/shequ',
    name: 'shequ',
    component:Shequpage
  },
  {
    //我的
    path: '/myuser',
    name: 'myuser',
    component:Myminepage
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
